<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>CL-CBS: libMultiRobotPlanning::CL_CBS&lt; State, Action, Cost, Conflict, Constraints, Environment &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CL-CBS
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacelibMultiRobotPlanning.html">libMultiRobotPlanning</a></li><li class="navelem"><a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html">CL_CBS</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibMultiRobotPlanning_1_1CL__CBS-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libMultiRobotPlanning::CL_CBS&lt; State, Action, Cost, Conflict, Constraints, Environment &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Car-Like Conflict-Based Search(CL-CBS) algorithm to solve the Multi-Agent Path Finding for Car-Like robots (CL-MAPF) problem.  
 <a href="classlibMultiRobotPlanning_1_1CL__CBS.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="cl__cbs_8hpp_source.html">cl_cbs.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6e43bc998165cf59e3486b82edfe8ed0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html#a6e43bc998165cf59e3486b82edfe8ed0">CL_CBS</a> (<a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &amp;environment)</td></tr>
<tr class="separator:a6e43bc998165cf59e3486b82edfe8ed0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d262a99dce9ed972cc22f5355fb101a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html#a2d262a99dce9ed972cc22f5355fb101a">~CL_CBS</a> ()</td></tr>
<tr class="separator:a2d262a99dce9ed972cc22f5355fb101a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0763496725b4f27f8bd680303ca362c9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html#a0763496725b4f27f8bd680303ca362c9">search</a> (const std::vector&lt; State &gt; &amp;initialStates, std::vector&lt; <a class="el" href="structlibMultiRobotPlanning_1_1PlanResult.html">PlanResult</a>&lt; State, Action, Cost &gt;&gt; &amp;solution)</td></tr>
<tr class="separator:a0763496725b4f27f8bd680303ca362c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename State, typename Action, typename Cost, typename Conflict, typename Constraints, typename Environment&gt;<br />
class libMultiRobotPlanning::CL_CBS&lt; State, Action, Cost, Conflict, Constraints, Environment &gt;</h3>

<p>Car-Like Conflict-Based Search(CL-CBS) algorithm to solve the Multi-Agent Path Finding for Car-Like robots (CL-MAPF) problem. </p>
<p>It applies a body conflict tree to address collisions considering shapes of the agents. It uses a new algorithm called Spatiotemporal Hybrid-State A* as the single-agent path planner to generate path satisfying both kinematic and spatiotemporal constraints. The file also integrates a sequential planning version of CL-CBS method for the sake of efficiency.</p>
<p>Details of the algorithm can be found in the following paper:<br />
Licheng Wen, Zhen Zhang, Zhe Chen, Xiangrui Zhao, and Yong Liu. CL-MAPF: Multi-Agent Path Finding for Car-Like Robots with Kinematic and Spatiotemporal Constraints.[<a href="https://arxiv.org/abs/2011.00441">arxiv</a>]</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">State</td><td>Custom state for the search. Needs to be copy'able </td></tr>
    <tr><td class="paramname">Action</td><td>Custom action for the search. Needs to be copy'able </td></tr>
    <tr><td class="paramname">Cost</td><td>Custom Cost type (integer or floating point types) </td></tr>
    <tr><td class="paramname">Conflict</td><td>Custom conflict description. A conflict needs to be able to be transformed into a constraint. </td></tr>
    <tr><td class="paramname">Constraints</td><td>Custom constraint description. The <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html" title="Environment class. ">Environment</a> needs to be able to search on the low-level while taking the constraints into account. </td></tr>
    <tr><td class="paramname"><a class="el" href="classlibMultiRobotPlanning_1_1Environment.html" title="Environment class. ">Environment</a></td><td>This class needs to provide the custom logic. In particular, it needs to support the following functions:<ul>
<li><code>void setLowLevelContext(size_t agentIdx, const Constraints* constraints)</code><br />
 Set the current context to a particular agent with the given set of constraints</li>
<li><code>Cost admissibleHeuristic(const State&amp; s)</code><br />
 Admissible heuristic. Needs to take current context into account.</li>
<li><code>bool isSolution(const State&amp; s, Cost gscore, std::unordered_map&lt;State, std::tuple&lt;State, Action, Cost, Cost&gt;</code>, StateHasher&gt;&amp; cameFrom)<br />
 Return true if the given state is a goal state for the current agent. Add analatic expansion into camefrom struct.</li>
<li><code>void getNeighbors(const State&amp; s, std::vector&lt;<a class="el" href="structlibMultiRobotPlanning_1_1Neighbor.html" title="Represents state transations. ">Neighbor</a>&lt;State, Action, int&gt; &gt;&amp; neighbors)</code><br />
 Fill the list of neighboring state for the given state s and the current agent.</li>
<li><code>bool getFirstConflict(const std::vector&lt;<a class="el" href="structlibMultiRobotPlanning_1_1PlanResult.html" title="Represents the path for an agent. ">PlanResult</a>&lt;State, Action, int&gt; &gt;&amp; solution, Conflict&amp; result)</code><br />
 Finds the first body conflict for the given solution for each agent. Return true if a conflict conflict was found and false otherwise.</li>
<li><code>void createConstraintsFromConflict(const Conflict&amp; conflict, std::map&lt;size_t, Constraints&gt;&amp; constraints)</code><br />
 Create a list of constraints for the given conflict.</li>
<li><code>void onExpandHighLevelNode(Cost cost)</code><br />
 This function is called on every high-level expansion and can be used for statistical purposes.</li>
<li><code>void onExpandLowLevelNode(const State&amp; s, Cost fScore, Cost gScore)</code><br />
 This function is called on every low-level expansion and can be used for statistical purposes. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="cl_cbs_8cpp-example.html#_a0">cl_cbs.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6e43bc998165cf59e3486b82edfe8ed0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename State , typename Action , typename Cost , typename Conflict , typename Constraints , typename Environment &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html">libMultiRobotPlanning::CL_CBS</a>&lt; State, Action, Cost, Conflict, Constraints, <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &gt;::<a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html">CL_CBS</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &amp;&#160;</td>
          <td class="paramname"><em>environment</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2d262a99dce9ed972cc22f5355fb101a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename State , typename Action , typename Cost , typename Conflict , typename Constraints , typename Environment &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html">libMultiRobotPlanning::CL_CBS</a>&lt; State, Action, Cost, Conflict, Constraints, <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &gt;::~<a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html">CL_CBS</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0763496725b4f27f8bd680303ca362c9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename State , typename Action , typename Cost , typename Conflict , typename Constraints , typename Environment &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classlibMultiRobotPlanning_1_1CL__CBS.html">libMultiRobotPlanning::CL_CBS</a>&lt; State, Action, Cost, Conflict, Constraints, <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &gt;::search </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; State &gt; &amp;&#160;</td>
          <td class="paramname"><em>initialStates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="structlibMultiRobotPlanning_1_1PlanResult.html">PlanResult</a>&lt; State, Action, Cost &gt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>solution</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/<a class="el" href="cl__cbs_8hpp_source.html">cl_cbs.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
